package com.cvo.scrumtoolkit.client.controller;

/**
 * Every view should be registered here so it can be called upon
 * 
 * @author Ricardo Capplelle
 *
 */
public enum View {
	HOME("com.cvo.scrumtoolkit.client.pannels.ProjectStorePanel.java"),
	NEWPROJECT("com.cvo.scrumtoolkit.client.pannels.NewProjectPanel"),
	PROJECTBACKLOG("com.cvo.scrumtoolkit.client.pannels.BacklogPanel"), 
	SPRINT(""), 
	SPRINTBLACKLOG("com.cvo.scrumtoolkit.client.pannels.SprintBacklogPanel"),
	BURNDOWNCHART(""),
	SCRUMBOARD(""),
	MENU("com.cvo.scrumtoolkit.client.pannels.MenuPanel"),
	DEFAULTPANEL("com.cvo.scrumtoolkit.client.pannels.DefaultPanel");
	
	
	private final String viewName;
	
	View (String viewName){
		this.viewName = viewName;		
	}
	/**
	 * Returns a Panel class name according to the enum type.
	 * If a view returns a blank value, thus is not yet implemented,
	 * it will return a default view. 
	 * @return
	 */
	public String getViewName() {
		if(this.viewName==""){
			return View.DEFAULTPANEL.viewName;
		}
		return viewName;
	}
	
	

}
